package day03;

public class IfElseIfDemo {
    public static void main(String[] args) {
        double price = 6000.0;//6000,1000,600,300
        if (price >= 2000) {
            price *= 0.5;
        } else if (price >= 1000) {
            price *= 0.7;
        } else if (price >= 500) {
            price *= 0.8;
        } else {
            price *= 0.9;
        }
        System.out.println("最终结算金额为：" + price);

        double price1 = 1000.0;//6000,1000,600,300
        if (price1 >= 2000) {
            price1 *= 0.5;
        } else if (price1 >= 1000) {
            price1 *= 0.7;
        } else if (price1 >= 500) {
            price1 *= 0.8;
        } else {
            price1 *= 0.9;
        }
        System.out.println("最终结算金额为：" + price1);

        double price2 = 600.0;//6000,1000,600,300
        if (price2 >= 2000) {
            price2 *= 0.5;
        } else if (price2 >= 1000) {
            price2 *= 0.7;
        } else if (price2 >= 500) {
            price2 *= 0.8;
        } else {
            price2 *= 0.9;
        }
        System.out.println("最终结算金额为：" + price2);


        double price3 = 300.0;//6000,1000,600,300
        if (price3 >= 2000) {
            price3 *= 0.5;
        } else if (price3 >= 1000) {
            price3 *= 0.7;
        } else if (price3 >= 500) {
            price3 *= 0.8;
        } else {
            price3 *= 0.9;
        }
        System.out.println("最终结算金额为：" + price3);

        int a1='-';
        System.out.println(a1);
    }
}
